{extend name='admin@public/content'}

{block name="button"}
<!--{if auth("$classuri/backadd")}-->
<!--<button data-update data-action="{:url('backadd')}" class='layui-btn layui-btn-sm layui-btn-primary'>批量拉黑粉丝</button>-->
<!--&lt;!&ndash;{/if}&ndash;&gt;-->
<!--&lt;!&ndash;{if auth("$classuri/sync")}&ndash;&gt;-->
<button data-modal='{:url("$classuri/add")}' class='layui-btn layui-btn-sm layui-btn-primary'>添加用户</button>
<!--{/if}-->
{/block}

{block name="content"}


<form autocomplete="off" class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get">


    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">用户手机号</label>
        <div class="layui-input-inline">
            <input name="phone" value="{$Think.get.phone|default=''}" placeholder="用户手机号" class="layui-input">
        </div>
    </div>


    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">用户等级</label>
        <div class="layui-input-inline">
            <select name="member_level">
                <option value="">请选择</option>
                {volist name='level' id='vo'}
                <option value="{$vo.id}" {if $Think.get.member_level eq $vo.id} selected {/if} >{$vo.title}</option>
                {/volist}
            </select>
        </div>
    </div>

    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">时 间</label>
        <div class="layui-input-inline">
            <input name="create_at" id='create_at' value="{$Think.get.create_at|default=''}" placeholder="关注时间" class="layui-input">
        </div>
    </div>


    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>

</form>
<script>
    window.laydate.render({range: true, elem: '#range-date'});
</script>
<form onsubmit="return false;" data-auto="true" method="post">
    <!--{if empty($list)}-->
    <p class="help-block text-center well">没 有 记 录 哦！</p>
    <!--{else}-->
    <input type="hidden" value="resort" name="action">
    <table class="layui-table" lay-skin="line">
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <input data-auto-none="none" data-check-target='.list-check-box' type='checkbox'/>
            </th>
            <th class='text-left'>ID</th>
            <th class='text-left'>手机号</th>
            <th class='text-left'>车牌号</th>
            <th class='text-left'>姓名</th>
            <th class='text-left'>用户等级</th>
<!--            <th class='text-left'>团队人数</th>-->
            <th class='text-left'>积分数量</th>
            <th class='text-left'>激活时间</th>
<!--            <th class='text-left'>所属维修企业</th>-->
            <th class='text-left'>注册时间</th>
            <th class='text-left'>操作</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='list-table-check-td think-checkbox'>
                <input class="list-check-box" value='{$vo.id}' type='checkbox'/>
            </td>
            <td class='text-left nowrap'>
                {$vo.id}
            </td>
            <td class='text-left nowrap'>
                {$vo.phone}
            </td>
            <td class='text-left nowrap'>
                {$vo.carid|default='未绑定车牌'}
            </td>
            <td class='text-left nowrap'>
                {$vo.truename|default=''}
            </td>
            <td class='text-left nowrap'>
                {$vo.member_level == 2 ? 'VIP': '预备会员'}
            </td>
            <!--<td class='text-left nowrap'>
                {$vo.team_num|default=''}
            </td>-->
            <td class='text-left nowrap'>
                {$vo.integral|default='0'}
            </td>


            <td class='text-left nowrap'>{$vo.create_at}</td>
<!--            <td class='text-left nowrap'>{$vo.company.shop_name|default='-'}</td>-->
            <td class='text-left nowrap'>
                {$vo.create_at}
            </td>
            <td class='text-left nowrap'>
                <!--<span class="text-explode">|</span>
                <a data-title="查看推荐" data-open="{:url('wechat/factory/lower')}?id={$vo.id}">查看下级</a>-->
                {if auth("$classuri/edit")}
                <span class="text-explode">|</span>
                <a data-title="编辑用户" data-modal='{:url("$classuri/edit")}?id={$vo.id}'>编辑</a>
                {/if}

                <!--{if auth("$classuri/user_balance")}  <span class="text-explode">|</span>  <a data-modal="{:url('wechat/fans/user_balance')}?member_id={$vo.id}" data-title="操作用户积分">用户积分</a> {/if}-->

                {if $vo.status eq 1 and auth("$classuri/forbid")}
                <span class="text-explode">|</span>
                <a data-update="{$vo.id}" data-field='status' data-value='0' data-action='{:url("$classuri/forbid")}'>禁用</a>
                {elseif auth("$classuri/resume")}
                <span class="text-explode">|</span>
                <a data-update="{$vo.id}" data-field='status' data-value='1' data-action='{:url("$classuri/resume")}'>启用</a>
                {/if}
            </td>

        </tr>
        {/foreach}
        </tbody>
    </table>
    {if isset($page)}<p>{$page|raw}</p>{/if}
    <!--{/if}-->
</form>
{/block}

{block name="script"}
<!--表单初始化-->
<script>
    window.laydate.render({range: true, elem: '#create_at'});
    window.form.render();
</script>

{/block}
